//
//  HelpCell.swift
//  GhostWorld
//
//  Created by Kam on 2018/8/10.
//  Copyright © 2018 LKGood. All rights reserved.
//

import UIKit

class HelpCell: UITableViewCell {
  
  // MARK: - IBOutlets
  
  @IBOutlet private weak var helpItemContentView: UIView!
  @IBOutlet weak var helpTitle: UILabel!
  
  // MARK: - Private vars
  
  private let selectView = UIView()
  
  // MARK: - Private methods
  
  
  
  // MARK: - Public vars
  
  
  
  // MARK: - Lifecycle
  
  override func awakeFromNib() {
    super.awakeFromNib()
    
    helpItemContentView.layer.cornerRadius = 4
    helpItemContentView.clipsToBounds = true
    
    // selected background view
    let backgroundView = UIView()
    backgroundView.backgroundColor = .clear
    
    selectView.backgroundColor = UIColor(fromRGB: 0x98000C)
    selectView.clipsToBounds = true
    selectView.layer.cornerRadius = 4
    backgroundView.addSubview(selectView)
    selectedBackgroundView = backgroundView
  }
  
  override func layoutSubviews() {
    super.layoutSubviews()
    
    selectView.frame = helpItemContentView.frame
  }
  
  override func setSelected(_ selected: Bool, animated: Bool) {
    super.setSelected(selected, animated: animated)
    
    // Configure the view for the selected state
  }
}

extension HelpCell {
  static let defaultHeight: CGFloat = 64
}
